﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XLua;

public class ResManager : MonoBehaviour
{
    [LuaCallCSharp]
    public static T LoadAsset<T>(string path) where T : Object
    {
        if (Application.platform == RuntimePlatform.WindowsEditor)
        {
            return Resources.Load<T>(path);
        }
        else
        {
            return null;
        }
    }

    [LuaCallCSharp]
    public static T[] LoadAllAssets<T>(string dirPath) where T : Object
    {
        if (Application.platform == RuntimePlatform.WindowsEditor)
        {
            return Resources.LoadAll<T>(dirPath);
        }
        else
        {
            return null;
        }
    }
}